/*html {
    font-size: calc(1em + 0.33vw);
    line-height: 1.5;
    color: #111;
    background-color: #fefefe;
}*/

/* Katex math typesetting */
.katex * {
    margin-top: 0;
    background-color: transparent;
}

/* Fix for IE :( */
[tabindex="-1"]:focus,
div:not([tabindex]):focus {
    outline: none;
}
[hidden] {
  display: none;
}


/* Buttons */
button {
    font-size: 1.25rem;
    border-radius: 0.33em;
    background: #111;
    color: #fefefe;
    padding: 0.75rem;
    border: 0;
}
[data-launch] {
  font-size: 0.66rem !important;
  padding: 0.5rem !important;
  margin-top: 0 !important;
  border-radius: 0 !important;
  border-top-left-radius: 0.33rem !important;
  box-shadow: none !important;
  background: #111 !important;
  color: #fefefe !important;
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* Page structure */
.wrapper {
    position: relative;
    margin-top: 0;
    overflow-x: hidden;
}
.intro-and-nav {
    font-size: 0.8rem;
    width: 15rem;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 2px solid;
}
.intro-and-nav > div {
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.intro {
  flex: 0 0 auto;
}
.patterns {
  flex: 1 1 auto;
}
.logo {
    border: 0;
}
.logo img {
    width: 100%;
    max-width: 12rem;
}
.library-desc {
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 25rem;
    text-align: center;
}
.main-and-footer {
    margin-left: 15rem;
}
.main-and-footer > div {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.25rem;
}
[role="contentinfo"] {
    font-size: 0.85rem;
    margin-top: 4rem;
    text-align: center;
}

/* Patterns navigation */
.patterns {
    overflow: auto;
    margin-top: 1.5rem;
}
.patterns * {
    margin-top: 0;
}
.patterns h3 {
    font-size: 1rem;
}
.patterns h3 + ul {
    margin-top: 0.75rem;
}
.patterns li {
    line-height: 1.125;
    list-style: none;
}
.patterns li + li {
    margin-top: 0.75rem;
}
.patterns ul ul {
    /*margin-left: 0.75rem;*/
}
.pattern a {
    border: 0;
    display: block;
    flex-wrap: nowrap;
    align-items: baseline;
    /*font-weight: bold;*/
    /*padding: 0 3rem;*/
    padding-right: 18px;
    text-align: center;
}
.pattern a:focus {
    outline: none;
}
.pattern span {
    /*margin-left: 0.125rem;*/
}

/* After */
.pattern [aria-current] {
  background-color: #111;
  clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
  color: #fefefe;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

/* Menu button */
#menu-button {
    display: none;
    width: 100%;
    text-align: center;
}
#menu-button:focus {
    outline: none;
    box-shadow: inset 0 0 0 0.25rem #999;
}

/* Tables of contents */
.toc {
    font-size: 0.85rem;
    border: 1px solid;
    padding: 1.5rem;
}
.toc h2 {
    font-size: 1rem;
}
.toc ol {
    margin-left: 0.75rem;
    margin-top: 0.5rem;
}

/* Disqus Comments */
#disqus-container {
  text-align: center;
}
#disqus-button {
  width: 100%;
  padding: 0.25em 0.75em;
}
#disqus-comments {
  display: none; 
}

/* Pattern lists */
.patterns-list {
    list-style: none;
    margin-left: 0;
}
ul#patterns-list {
    padding: 0 0 0 0;
}
.patterns-list h2 {
    font-size: 1.25rem;
    line-height: 1.6;
}
.patterns-list a {
    border: 0;
}


/* SVG icons */
a svg,
button svg,
h1 svg,
th svg,
li > svg {
    height: 0.75em;
    width: 0.75em;
    margin-right: 0.25em;
}
h1 svg {
  margin-right: 0;
  width: 0.85em;
  height: 0.85em;
}
.wcag-icon {
  width: 1.25em;
}
.bookmark-icon {
  vertical-align: middle;
}
.link-icon {
  width: 0.75em;
  height: 0.75em;
}
.tags svg, .link-icon {
  vertical-align: middle;
}
.balloon-icon {
  width: 0.75em;
  margin-right: 0;
}
.print {
    white-space: nowrap;
    /*font-style: normal;*/
}


/* Utilities */
.vh {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.gallery {
  display: flex;
  justify-content: center;
}

/* Media queries */
/*@media screen and (max-width: 45em) {*/
@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
    }
    body a {
        hyphens: auto;
    }
    [role="banner"] {
        position: static;
        width: auto;
        height: auto;
    }
    .intro {
        text-align: center;
    }
    .intro-and-nav {
        border-right: none;
    }
    .intro-and-nav > div {
        padding: 1.5rem;
    }
    .main-and-footer {
        margin: 0;
    }
    main {
      min-height: auto;
    }
    #patterns-list {
      margin-top: 0.5rem;
      background-color: #e7e7e7;
    }
    .patterns h3 {
        font-size: 1.5rem;
        padding: 1.5rem 1rem 0.75rem;
    }
    .patterns li:not(.pattern) {
        margin-top: 0;
    }
    .patterns ul ul {
        margin: 0;
    }
    .patterns li {
        margin-top: 0;
    }
    .pattern {
        font-size: 1rem;
    }
    .pattern a {
        padding: 1rem;
        display: block;
        text-align: center;
    }
    .pattern [aria-current] {
        clip-path: none;
        padding: 1rem;
    }
    .pattern + .pattern {
        margin-top: 0;
    }
    #menu-button {
        display: block;
    }
    #patterns-list {
        display: none;
    }
    .toc-link {
      display: none;
    }
    [aria-expanded="true"] + #patterns-list {
        display: block;
    }
    code {
      word-break: break-all;
    }
}
@media print {
    .wrapper:not(.print-version) .intro-and-nav,
    .wrapper:not(.print-version) [role="contentinfo"] {
        display: none;
    }
    .main-and-footer {
        margin-left: 0;
    }
    a {
        border: 0;
    }
    main a::after {
        content: " (" attr(href) ")";
        word-break: break-word;
    }
    main nav a::after {
        content: '';
    }
    .cmd code {
        background: #fefefe;
        color: #111;
    }
    pre code {
        white-space: pre-wrap !important;
    }
    .expandable-section {
        border: 0;
        padding: 0;
    }
    .expandable-section + p {
        margin-top: 0.75rem;
    }
    [id^="js-expandable-"] {
        display: block;
    }
    [data-expands] svg {
        display: none;
    }
    main *:not(.with-desc) {
        page-break-inside: avoid;
    }
    .note.warning {
        border-left: 0.5rem solid;
        background: none;
    }
}
@media (-ms-high-contrast: active) {
  img[src*=".svg"] {
    background: #fefefe;
    padding: 0.5rem;
  }
  .ticks li::before {
    content: '✓';
    background: none;
    width: auto;
    top: 0;
  }
  .note.warning {
      border-left: 0.5rem solid;
      background: none;
  }
}
